import { createRouter,createWebHistory,RouteRecordRaw } from "vue-router";

import index from "../components/index.vue";
import ProductVue from "../components/Product.vue";
import AboutUsVue from "../components/AboutUs.vue";
import CallMeVue from "../components/CallMe.vue";

//创建路由数据集合 --array
const routes:Array<RouteRecordRaw>=[
    {
        path:'/',
        name:'index',
        component:index,
    },
    {
        path:'/product',
        name:'product',
        component:ProductVue,

    },
    {
        path:'/about',
        name:'about',
        component:AboutUsVue,

    },
    {
        path:'/call',
        name:'call',
        component:CallMeVue,

    }
]

//创建一个vue-router的对象
const router = createRouter({
    history:createWebHistory(),
    routes,
})

//暴露
export default router